<?php
include_once '../init.php';

class PromotionTests{
	
	public static function add(){
		
		$p = new Promotion();
		$p->setName("zima 2009");
		$p->setDesc("trululu");
		$p->setValue(50);
		$p->setDateTo("2009-11-10");
		$p->setDateFrom("2010-11-21");
		
		PromotionUtils::add($p);
	}
	
	public static function rem(){
		PromotionUtils::removeById(1);
	}
	
	public static function modify(){
		
		$p = new Promotion();
		$p->setName("Modyfikacja Promocja");
		$p->setId(8);
		$p->setValue(30);
		$p->setDateTo("2010-01-01");
		$p->setDateFrom("2009-02-21");
		$p->setDesc("uuuuu");
		
		PromotionUtils::modify($p);
		
	}
	public static function find(){
		
		$controls = new PromotionSearchControls();
		//$controls->setName("Modyfikacja");
		//$controls->setSid(1);
		$controls->setUid(2);
		//$controls->setDateTo("2010-01-06");
		
		PromotionUtils::find($controls);
	}
	
	public static function get(){
		PromotionUtils::get(1);
		
	}
}

//PromotionTests::add();
//PromotionTests::rem();
//PromotionTests::modify();
//PromotionTests::find();
PromotionTests::get();
?>